//
//  SLAFNetWorkingTool.h
//
//  Created by 张树林 on 15/11/18.
//  Copyright (c) 2015年 张树林. All rights reserved.
//  Email: zhangslmail@yeah.net
//  Version 1.0


#import <Foundation/Foundation.h>
#import <AFNetworking.h>



typedef void (^SUCCESS_BLOCK) (id responseObject);
typedef void (^FAILURE_BLOCK) (NSError *error);

@interface SLAFNetWorkTool : NSObject

+ (void)getWithURL:(NSString *)URLStr
            cookie:(NSString *)cookie
           success:(SUCCESS_BLOCK)successBlock
           failure:(FAILURE_BLOCK)failureBlock;

+ (void)postWithURL:(NSString *)URLStr
         parameters:(id)parameters
             cookie:(NSString *)cookie
            success:(SUCCESS_BLOCK)successBlock
            failure:(FAILURE_BLOCK)failureBlock;

+ (void)postWithURL:(NSString *)URLStr
         bodyStr:(NSString *)bodyStr
             cookie:(NSString *)cookie
            success:(SUCCESS_BLOCK)successBlock
            failure:(FAILURE_BLOCK)failureBlock;

+ (void)cacheGetWithURL:(NSString *)URLStr
                 cookie:(NSString *)cookie
                success:(SUCCESS_BLOCK)successBlock
                failure:(FAILURE_BLOCK)failureBlock;

+ (void)cachePostWithURL:(NSString *)URLStr
            bodyStr:(NSString *)bodyStr
             cookie:(NSString *)cookie
            success:(SUCCESS_BLOCK)successBlock
            failure:(FAILURE_BLOCK)failureBlock;

+ (void)startMonitorNet;

+ (void)stopMonitorNet;

+ (BOOL)reachable;

+ (AFNetworkReachabilityStatus)netStatus;

@end
